﻿<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeFile="EvectionInfoList.aspx.cs" Inherits="admin_EvectionInfoList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
            <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
   <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>

   <style type="text/css">
<!--
html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
-->
</style>

</head>

<body>
    <form id="form1" runat="server">
     <div class="sub_right_top">
    <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">出差登记</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
    <div class="dengji_tubiao">
        <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/admin/AddEvectionInfo.aspx">【登记】</asp:LinkButton>
        <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">【出差历史记录】</asp:LinkButton>
    </div>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" BorderColor="#77ACD0" HorizontalAlign="Center"
                         BorderWidth="1px"
                        CellPadding="3" DataKeyNames="EvectionInfoId" GridLines="Horizontal" Width="99%" OnRowCommand="GridView1_RowCommand" EmptyDataText="当前没有任何出差信息！" OnPageIndexChanging="GridView1_PageIndexChanging">
                        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                        <Columns>
                            <asp:BoundField DataField="EvectionInfoId" HeaderText="序号">
                                <HeaderStyle CssClass="itemhead" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="开始日期">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("BeginDate") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("BeginDate")).ToShortDateString() %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="终止日期">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("EndDate") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# ((DateTime)Eval("EndDate")).ToShortDateString() %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="出差地区">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("EvectionAddress") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("EvectionAddress").ToString().Length>20?Eval("EvectionAddress").ToString().Substring(0,20)+"...":Eval("EvectionAddress")%>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="回归">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CommandArgument='<%# Eval("EvectionInfoId") %>'
                                        CommandName="updateIsBack" ImageUrl="~/images/go_man.gif" Visible='<%# Convert.ToInt32(Eval("IsBack"))==0?true:false %>' OnClientClick="return confirm('确认回归么？')" />
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="状态">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Convert.ToInt32(Eval("State"))==0?"未批准":"已批准" %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="itemhead" />
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle BackColor="Transparent" ForeColor="Black" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                                    <PagerStyle BackColor="#E4F1FD" ForeColor="#1E5494" HorizontalAlign="Right" />
                                    <HeaderStyle BackColor="#E4F1FD" Font-Bold="True" ForeColor="#1E5494" BorderColor="#77ACD0" HorizontalAlign="Center"/>
                                    <AlternatingRowStyle BackColor="#E4F1FD" />
                    </asp:GridView>
    
    </div>
    </div>
    </form>
</body>
</html>
